<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('证件已过期')"/>
    <th:block th:include="include :: layout-latest-css"/>
    <th:block th:include="include :: ztree-css"/>
    <th:block th:include="include :: bootstrap-editable-css"/>
    <th:block th:include="include :: container-css"/>
    <th:block th:include="include :: select2-css"/>
</head>
<style>
    .fixed-table-container .bs-checkbox .th-inner {
        padding: 8px 8px !important;
    }

</style>
<body class="gray-bg">
<div class="container-div">
    <div class="row">
        <div class="col-sm-12 search-collapse">
            <form id="formId">
                <div class="select-list">
                    <ul>
                        <li>
                            <p>工号：</p>
                            <input type="text" name="badge"/>
                        </li>
                        <li>
                            <p>姓名：</p>
                            <input type="text" name="name"/>
                        </li>
                        <li>
                            <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i
                                    class="fa fa-search"></i>&nbsp;搜索</a>
                            <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i
                                    class="fa fa-refresh"></i>&nbsp;重置</a>
                        </li>
                    </ul>
                </div>
            </form>
        </div>


        <div class="col-sm-12 select-table table-striped">
            <table id="bootstrap-table" data-mobile-responsive="true"></table>
        </div>
    </div>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: layout-latest-js"/>
<th:block th:include="include :: ztree-js"/>
<th:block th:include="include :: bootstrap-table-editable-js"/>
<th:block th:include="include :: hr-help-js"/>
<th:block th:include="include :: datetimepicker-js"/>

<script th:inline="javascript">

    var prefix = ctx + "empInfo/Remind";
    $(function () {
        $(".datetimepicker-demo-2").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-2',
                type: 'date'
            });

        });
        $(".datetimepicker-demo-1").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
        layui.use('laydate', function () {
            var laydate = layui.laydate;
            laydate.render({
                elem: '.laydate-demo-1',
                type: 'date'
            });
        });
        getData();
    });

    function getData() {
        var columns = [];
        var badge = {field: 'badge', title: '工号'};
        var name = {field: 'name', title: '中文名'};
        var eName = {field: 'eName', title: '英文名'};
        var compName = {field: 'compName', title: '公司名称'};
        var depName = {field: 'depName', title: '部门名称'};
        var jobName = {field: 'jobName', title: '工作岗位'};
        var empStatusTitle = {field: 'empStatusTitle', title: '员工状态'};
        var ReportToName = {field: 'ReportToName', title: '行政上级'};
        var WFReportToName = {field: 'WFReportToName', title: '职能上级'};
        var CertTypeTitle = {field: 'CertTypeTitle', title: '证件类型'};
        var certno = {field: 'certno', title: '证件编号'};
        var payOrg = {field: 'payOrg', title: '颁发机构'};
        var BeginDate = {field: 'BeginDate', title: '颁发日期'};
        var Term = {field: 'Term', title: '有效期'};
        var EndDate = {field: 'EndDate', title: '有效截止日期'};
        var IsDisable = {
            title: "是否失效",
            formatter: function (value, row, index) {
                if (row.IsDisable == false) {
                    return '否'
                } else if (row.IsDisable == true) {
                    return '是'
                }
            }
        };

        columns.push(badge,name,eName,compName,depName,jobName,empStatusTitle,ReportToName,WFReportToName);
        columns.push(CertTypeTitle,certno,payOrg,BeginDate,Term,EndDate,IsDisable);

        $("#close").click();
        var options = {
            url: prefix + "/certificatesExpireList",
            height: $(window).height() - 120,
            modalName: "证件已过期",
            columns:columns
        };
        $.table.init(options);
    }


</script>
</body>
</html>